package org.com.web;

import java.util.HashMap;
import java.util.Map;

import org.com.micro.service.HelloService;
import org.com.micro.service.WorldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.dubbo.config.annotation.Reference;

@Controller
public class WorldController {

	@Reference(version = "1.0.0", url = "dubbo://192.168.99.1:20880")
	HelloService helloService;
	
	@RequestMapping(value = "/home", method = RequestMethod.GET)
	@ResponseBody
	Map<String, Object> home() {
		HashMap<String, Object> map = new HashMap<String, Object>() {
			{
				put("name", "cike");
			}
		};
		return map;
	}
}
